package com.gdupt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gdupt.entity.ServiceUserAllot;
import com.gdupt.entity.vo.ServiceUserAllotAndServiceManagementVo;
import com.gdupt.mapper.ServiceUserAllotMapper;
import com.gdupt.service.IServiceUserAllotService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务用户分配表 服务用户关系表 服务实现类
 * </p>
 *
 * @author gdupt
 * @since 2018-11-21
 */
@Service
public class ServiceUserAllotServiceImpl extends ServiceImpl<ServiceUserAllotMapper, ServiceUserAllot> implements IServiceUserAllotService {
    @Autowired
    private ServiceUserAllotMapper serviceUserAllotMapper;
    boolean flg=false;
//  返回归档服务
    @Override
    public List<ServiceUserAllotAndServiceManagementVo> findArchiveService(IPage page,String customerName, String outline,String serviceType) {
        List<ServiceUserAllotAndServiceManagementVo> archiveService = serviceUserAllotMapper.findArchiveService(page,customerName,outline,serviceType);
        return archiveService;
    }
//服务分配
    @Override
    public boolean insertAllotService(ServiceUserAllot serviceUserAllot) {
         flg =serviceUserAllotMapper.insertAllotService(serviceUserAllot);
         return flg;
    }
//服务处理
    @Override
    public List<ServiceUserAllotAndServiceManagementVo> findHandleService(IPage page,String customerName, String outline,String serviceType) {
        List<ServiceUserAllotAndServiceManagementVo> handleService = serviceUserAllotMapper.findHandleService(page,customerName,outline,serviceType);
        return handleService;
    }
//服务处理>更新
    @Override
    public boolean updateHandleService(ServiceUserAllot serviceUserAllot) {
       flg=serviceUserAllotMapper.updateHandleService(serviceUserAllot);
        return flg;
    }
//服务反馈
    @Override
    public List<ServiceUserAllotAndServiceManagementVo> findFeedbackService(IPage page,String customerName, String outline,String serviceType) {
        List<ServiceUserAllotAndServiceManagementVo> feedbackService = serviceUserAllotMapper.findFeedbackService(page,customerName,outline,serviceType);
        return feedbackService;
    }
//服务反馈>更新
    @Override
    public boolean updateFeedbackService(ServiceUserAllot serviceUserAllot) {
        flg=serviceUserAllotMapper.updateFeedbackService(serviceUserAllot);
        return flg;
    }

}
